package com.woniuxy.mesboot.service.impl;

import com.woniuxy.mesboot.dto.StorageDTO;
import com.woniuxy.mesboot.entity.Storage;
import com.woniuxy.mesboot.mapper.StorageMapper;
import com.woniuxy.mesboot.service.StorageService;
import com.woniuxy.mesboot.vo.StorageVO;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class StorageServiceImpl implements StorageService {
    @Resource
    private StorageMapper storageMapper;

    @Override
    public StorageVO selectInfoById(Long id) {
        return storageMapper.selectInfoById(id);
    }

    @Override
    public List<StorageVO> selectAll(StorageDTO dto) {
        return  storageMapper.selectAll(dto);
    }

    @Override
    public int deleteByPrimaryKey(Long id) {
        return storageMapper.deleteByPrimaryKey(id);
    }

    @Override
    public int insert(Storage record) {
        return storageMapper.insert(record);
    }

    @Override
    public int insertSelective(Storage record) {
        return storageMapper.insertSelective(record);
    }

    @Override
    public Storage selectByPrimaryKey(Long id) {
        return storageMapper.selectByPrimaryKey(id);
    }

    @Override
    public int updateByPrimaryKeySelective(Storage record) {
        return storageMapper.updateByPrimaryKeySelective(record);
    }

    @Override
    public int updateByPrimaryKey(Storage record) {
        return storageMapper.updateByPrimaryKey(record);
    }
}
